﻿#include<iostream>
using namespace std;
int main() {
	int a[5]{ 1,2,3,4,5 };
	int* b = new int[5];
	memcpy(b, a, 5 * sizeof(int));//可以不用全部复制

	for (int i = 0; i < 5; i++)cout << b[i] << endl;

	int* c = new int[5];
	memset(c, 0, 4 * 5);
	memcpy(a, c, 4 * 5);
	for (int i = 0; i < 5; i++)cout << a[i] << endl;
}